package poj;

import java.util.Scanner;

public class POJ1003 {
	public int getCardsNum(double num){
		int i = 2;
		int counter = 0;
		double sum = 0;
		boolean flag = true;
		while(flag){
			sum = sum + (double)1/i;
			i++;
			if(sum > num){
				flag = false;
			}
			counter++;
		}
		return counter;
	}
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			double num = in.nextDouble();
			//System.out.println(num);
			if(num !=0){
				System.out.println(new POJ1003().getCardsNum(num) +" Card" + (new POJ1003().getCardsNum(num) == 1?"":"s"));
			}else{
				System.out.println("Exit!!!");
				System.exit(1);
			}
		}
		double sum = 0;
		for(int i = 2; i <= 10000; i++)
			sum = sum + (double)1/i;
		System.out.println(sum);
	}
}
